            <div id="content"> <!-- Content begins here -->
                
                <?php echo $this->element('admin/flash') ?>
                <div class="clear"></div>
                <h2>Manage Blocks</h2><a class="btn" href="<?php echo $html->url(array('controller'=>'blocks','action'=>'add_block')) ?>"><b>+ New Block</b></a>
                <div class="clear"></div>
                <input type="hidden" id="ajax_path" value="<?php echo $this->base ?>/admin/blocks/manage"/>
                <div class="sortable_grid">
                    <?php foreach($blocks as $item): ?>
                        <h3 class="title"><?php echo $item['Blockarea']['name'] ?></h3>
                        
                        <ul class="sortable connectedSortable block" rel="<?php echo $item['Blockarea']['name'] ?>">
                            <?php if(count($item['Block'])):?>
                                <?php foreach($item['Block'] as $b): ?>
                                <li rel="<?php echo $b['id'] ?>"><span class="move_icon"><img src="<?php echo $this->base ?>/css/admin/assets/move.gif" alt=""></span><label><?php echo $b['name'] ?></label><a href="<?php echo $html->url('/admin/blocks/delete_block/').$b['id'] ?>" class="delete_btn" onclick="return confirm('Are you sure?')">DELETE</a><a href="<?php echo $html->url('/admin/blocks/edit_block/').$b['id'] ?>" class="edit_btn">EDIT</a></li>
                                <?php endforeach ?>
                            <?php endif ?>                        
                        </ul>
                        
                    <?php endforeach ?>
                    <br /><br />
                    <h3 class="title inactive">Inactive Blocks</h3>
                    <ul class="sortable connectedSortable inactive_block">
                        <?php if(count($inactives)):?>
                        <?php foreach($inactives as $b): ?>
                        <li rel="<?php echo $b['Block']['id'] ?>"><span class="move_icon"><img src="<?php echo $this->base ?>/css/admin/assets/move.gif" alt=""></span><label><?php echo $b['Block']['name'] ?></label><a href="<?php echo $html->url('/admin/blocks/delete_block/').$b['Block']['id'] ?>" class="delete_btn"  onclick="return confirm('Are you sure?')">DELETE</a><a href="<?php echo $html->url('/admin/blocks/edit_block/').$b['Block']['id'] ?>" class="edit_btn">EDIT</a></li>
                        <?php endforeach ?>
                        <?php endif ?>               
                    </ul>
                                     
                </div>
                <div class="input no_margin_bottom">
                    <span class="btn"><input type="submit" class="save_block" value="SAVE BLOCKS" /></span>
                    <img src="<?php echo $this->base?>/css/admin/assets/loading.gif" alt=""  class="mt10 ml10 hide" id="loading"/>
                </div>
                                 
                

                
        </div> <!-- END Content -->
        